import urllib.request as ur
# 构建request对象
request = ur.Request('https://edu.csdn.net/')
reponse = ur.urlopen(request).read()
with open('req1.html', 'wb') as f:
    f.write(reponse)